<template>
	<div class="main">
		<div>
			<div>
				<div>
					<img src="@/assets/images/wechat/student/battle/1.png">
				</div>
				<div>
					<div>
						<div>
							<img src="@/assets/images/wechat/student/stucenter/kaung.png">
						</div>
						<div>{{studentData.name}}</div>
					</div>
					<div>
						<div>
							<div>
								<div>
									<img src="@/assets/images/wechat/student/stucenter/3.png">
								</div>
								<div>{{studentData.schoolName}}</div>
							</div>
							<div>
								<div>
									<img src="@/assets/images/wechat/student/stucenter/5.png">
								</div>
								<div>{{studentData.levelName}}</div>
							</div>
						</div>
						<router-link :to="{path:'/wechatstudent/studentinfo'}">
							<img v-if="studentData.avatar" :src="studentData.avatar">
							<img v-else src="@/assets/images/wechat/student/stucenter/2.png">
						</router-link>
						<div>
							<div>
								<div>
									<img src="@/assets/images/wechat/student/stucenter/3.png">
								</div>
								<div>时间:120</div>
							</div>
							<div>
								<div>
									<img src="@/assets/images/wechat/student/stucenter/5.png">
								</div>
								<div>
									金币:299
								</div>
							</div>
						</div>
					</div>
					<div>
						<div>
							<div></div>
							<div></div>
						</div>
						<div>
							<img src="@/assets/images/wechat/student/stucenter/9.png">
						</div>
						<div>LV9</div>
					</div>
				</div>
			</div>
			<div>
				<router-link :to="{path:'/wechatstudent/rankedgame'}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a1.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>排位赛</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>个人匹配随机对战</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:'/wechatstudent/battle'}" >
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a2.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>校园争霸</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>以校为单位对战</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:'/wechatstudent/ranklist'}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a3.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>排行榜</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>查看军功</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:'/wechatstudent/knowledge'}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a4.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>知识升级</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>获取时间碎片卡</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:''}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a3.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>维权宝箱</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>在线法律咨询</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:'/wechatstudent/practice'}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a6.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>练兵场</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>同时挑战，时间币兑换</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:''}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a7.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>军功兑换</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>获取军功</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:'/wechatstudent/forgearea'}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a8.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>锻造区</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>碎片合成</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:''}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a9.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>校园圈</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>社交功能</div>
						</div>
					</div>
				</router-link>
				<router-link :to="{path:''}">
					<div>
						<img src="@/assets/images/wechat/student/stucenter/a10.png">
					</div>
					<div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/11.png">
							</div>
							<div>仓库</div>
						</div>
						<div>
							<div>
								<img src="@/assets/images/wechat/student/stucenter/10.png">
							</div>
							<div>储藏</div>
						</div>
					</div>
				</router-link>
			</div>
		</div>
	</div>
</template>

<script>
	import router from '@/router/index'
	import { findStudentByToken } from '@/api/student'
	export default {
		components: {
			
		},
		data() {
			return {
				studentData:{
					
				}
			}
		},
		created:async function() {
			const ajaxData = {}
			const resultData = await findStudentByToken(ajaxData)
			if(resultData.code==200){
				this.studentData=resultData.data
				if(this.studentData.firstLogin){
					router.push({path:"/wechatstudent/studentinfo"})
				}
			}
		},
		beforeMount: function() {
	
		},
		mounted: function() {
	
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		width: 100%;
		height: 100vh;
		overflow: auto;
		background-color: #670914;
		>div{
			margin-top:39px;
			margin-left:21px;
			margin-right:21px;
			margin-bottom: 39px;
			>div:nth-child(1){
				position: relative;
				>div:nth-child(1){
					height:141px;
					>img{
						width:100%;
						height: 100%;
					}
				}
				>div:nth-child(2){
					position: absolute;
					left:7px;
					right:7px;
					top:12px;
					overflow: hidden;
					>div:nth-child(1){
						position: relative;
						>div:nth-child(1){
							width:120px;
							height:16px;
							margin:auto;
							>img{
								width:100%;
							}
						}
						>div:nth-child(2){
							position: absolute;
							left:108px;
							right:108px;
							top:0;
							line-height: 16px;
							text-align: center;
							font-size: 12px;
							font-weight: normal;
							color: #FFFFFF;
						}
					}
					>div:nth-child(2){
						margin-top:12px;
						display:flex;
						justify-content: space-between;
						>div:nth-child(1),>div:nth-child(3){
							>div{
								position: relative;
								>div:nth-child(1){
									width:95px;
									>img{
										width:100%;
									}
								}
								>div:nth-child(2){
									font-size: 11px;
									font-weight: 400;
									line-height:30px;
									color: #916D59;
									position: absolute;
									left:0px;
									right:0px;
									top:0;
									text-align: center;
								}
							}
							>div:nth-child(1){
								margin-bottom:11px;
							}
						}
						>a{
							width:63px;
							height:63px;
							border-radius: 50%;
							overflow: hidden;
							>img{
								width: 100%;
							}
						}
					}
					>div:nth-child(3){
						position: relative;
						width: 122px;
						margin:auto;
						overflow: hidden;
						>div:nth-child(1){
							margin-top:22px;
							position: relative;
							margin-left:5px;
							>div:nth-child(1){
								background-color: #987C66;
								height: 7px;
								border-radius: 5px;
							}
							>div:nth-child(2){
								position: absolute;
								left:0;
								top:0;
								width:20%;
								height: 7px;
								background-color: #E18B4C;
								border-radius: 5px;
							}
						}
						>div:nth-child(2){
							position: absolute;
							left:0px;
							top:5px;;
						}
						>div:nth-child(3){
							position: absolute;
							text-align: center;
							left:5px;
							top:8px;
							font-size:12px;
						}
					}
				}
			}
			>div:nth-child(2){
				display:flex;
				justify-content: space-between;
				flex-wrap: wrap;
				>a{
					margin-top:17px;
					position: relative;
					width:48%;
					>div:nth-child(1){
						width:164px;
						>img{
							width:100%;
						}
					}
					>div:nth-child(2){
						width:164px;
						position: absolute;
						left:0;
						top:0;
						>div:nth-child(1){
							position: relative;
							margin-top:9px;
							>div:nth-child(1){
								width:100%;
								>img{
									width:100%;
								}
							}
							>div:nth-child(2){
								position: absolute;
								left:0;
								top:0;
								right:0;
								text-align: center;
								font-size: 20px;
								font-weight: normal;
								color: #483221;
								line-height: 19px;
							}
						}
						>div:nth-child(2){
							position: relative;
							margin-top:96px;
							>div:nth-child(1){
								width:151px;
								margin:auto;
								>img{
									width:100%;
								}
							}
							>div:nth-child(2){
								position: absolute;
								left:0;
								top:0;
								right:0;
								text-align: center;
								font-size: 13px;
								font-weight: normal;
								color: #483221;
								line-height: 30px;
							}
						}
					}
				}
			}
		}
	}
</style>
